<%@page import="Models.PrinterModel"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <!DOCTYPE html> 
       
  <title>ICS SNMP Printer Management</title> 
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css" />
  <script src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
  <script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js"></script>
</head> 
<body> 
 
<div data-role="page">
 
 

<div data-role="content" id="Printers">
 
  <div data-role="header">
    <h1>Active Printers</h1>
  </div>
 
  <div data-role="content" data-theme ="c"> 
  <center>
  <p> This is a page to show a list of active printers </p>
  <p>It would be cool if when we click on each printer it simply lists the SNMP table of each.
  </center>
    <ul data-role="listview" data-theme="c" data-inset="true" data-filter-theme="f" data-filter="true" >
        
        <%
         out.println("<form action=" +'"' + " PrinterDetails.do" +'"' + " method=" +'"'+"post" +'"'+'>');
  List<String> models = (List) request.getAttribute("PrinterModels");
  
  for(int i=0;i<models.size(); i++){
      
       out.println("<button type="+"submit" + " formmethod=" +'"' +"post"+ '"'+ "formaction=" +'"' +"PrinterDetails.do"+ '"'+ " name=" + '"'+ "PrinterChoice"+ '"'+ " value="+'"' + models.get(i) +'"' +">" + models.get(i) +"</button>" );       
  }
  out.println("</form>");
%>


    </ul>
  </div>
 
</div>
</div>

 
</body>
</html>
